Rie, a Compiler Generator Based on a One-pass-type Attribute Grammar

نویسندگان

  • Masataka Sassa
  • Harushi Ishizuka
  • Ikuo Nakata
چکیده

We herein describe a compiler generator, Rie, which is based on a one-pass-type attribute grammar. LR-attributed grammars are one class of attribute grammars in which attribute evaluation can be performed in one pass during LR parsing without creating a parse tree. Rie was developed based on a variant of an LR-attributed grammar called ECLR-attributed grammar (equivalence class LR-attributed grammar), in which equivalence relations are introduced into the LR-attributed grammar. Rie generates a one-pass compiler from a compiler description given in attribute grammar form. Many language processors have been developed using Rie. The generated compiler is only about 1·8 times slower than a handwritten compiler, which is fairly efficient for a compiler generated from formal descriptions.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Incremental Attribute Evaluation of LR - attributedgrammars Using Space - E cient Data

Incremental attribute evaluation of one-pass attribute grammars (AGs) has not yet been fully investigated. However, considering the lightness of one-pass AGs, combining incremental evaluation and parsing in one-pass AGs may bring about a time-and space-eecient language processor. In this paper, an incremental attribute evaluation method based on LR-attributed grammar, a class of one-pass attrib...

متن کامل

A Compiler Generator for Attributive Evaluation During LR Parsing

A compiler generator called Metauncle is introduced. Metauncle produces one-pass compilers in which all attributes are evaluated in conjunction with LR parsing. The description of a language is given to Metauncle as an L-attributed grammar, and the system transforms it before generation of an evaluator to another attribute grammar satisfying the requirements for evaluation. The transformed gram...

متن کامل

Syntax-directed Transformations of XML Streams

We discuss the TransformX framework for syntax-directed transformations of XML streams. In this framework, we define stream transformations as a special form of attributed extended regular tree grammars where all attributes can be evaluated in a single pass over the input, a necessity in stream processing. In the tradition of tools such as Yacc, the TransformX parser generator translates attrib...

متن کامل

AspectLISA: An Aspect-oriented Compiler Construction System Based on Attribute Grammars

The use of object-oriented techniques and concepts, like encapsulation and inheritance, greatly improves language specifications towards better modularity, reusability and extensibility. Additional improvements can be achieved with aspect-oriented techniques since semantic aspects also crosscut many language constructs. Indeed, aspect-oriented constructs have been already added to some language...

متن کامل

Parallel Evaluation of LR–Attributed Grammars

In this paper, we present a novel approach to the parallel implementation of one–pass compilers. Based on attribute grammars, it combines the well–known LR parsing technique for the underlying context–free grammar with the parallel evaluation of attribution rules. In order to integrate syntactic and semantic analysis, the LR parsing stack is enriched by additional information, resulting in a so...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Softw., Pract. Exper.

دوره 25  شماره 

صفحات  -

تاریخ انتشار 1995